//
// Created by EDZ on 2022/2/11.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "print_9x9_table.h"
// 杨小过2022年初学代码
void print_9x9_table(){
    int a;
    int b;
    int c;
    printf("请输入一个正整数！\n");
    int  cha;
    char buff[20];
    char **ch = NULL;
    int len = 0;
    while ((cha = getchar()) != '\n'
        || (cha >= '0' && cha <= '9')) {
        buff[len++] = (char) cha;
    }
    int x = (int ) strtol(buff, ch,len);

    for(a=x;a<10;a++){
        for(b=x;b<10;b++){
            c=a*b;
            if(b>a){
                break;
            }
            printf("%d*%d=%d",b,a,c);
            if(c<10){printf("   ");
            }
            else{
                printf("  ");
            }
        }
        printf("\n");
    }
}
